﻿create proc editquyen_loadluoiquyen
@IDPhanNhomNguoiDung int,
@ViTri int,
@ChuongTrinh int,
@NhomMenu int
as
select a.ID,d.MenuID,d.TenMenu,c.MenuCha,c.Cap,a.Quyen_CapNhat,a.Quyen_Xem,a.Quyen_Xoa
from QuanTri_EditUserRoleInGroup a,QuanTri_CapQuyenNguoiDungSuDungMenu b,QuanTri_PhanNhomMenu c,DanhMuc_Menu d
Where a.IDCapQuyen=b.ID and a.IDPhanNhomMenu=c.ID and c.MenuID=d.MenuID
and a.IDPhanNhomNguoiDung=@IDPhanNhomNguoiDung and b.MaChuongTrinh=@ChuongTrinh and b.IDViTri=@ViTri and c.MaNhomMenuND=@NhomMenu